import { trigger, state, style, transition, animate } from '@angular/animations';

export const flyIn = trigger('flyIn', [
  state('in', style({opacity: 1, transform: 'translateX(0)'})),
  transition('void => *', [
    style({
      opacity: 0,
      transform: 'translateY(20px)'
    }),
    animate('0.5s ease-in')
  ]),
  transition('* => void', [
    animate('0.5s 10 ease-out', style({
      opacity: 0,
      transform: 'translateY(20px)'
    }))
  ])
]);

